#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
typedef int HeapDatatype;
typedef struct Heap
{
	HeapDatatype* a;
	int size;
	int capacity;
}HP;

void AdjustDown(int* a, int n, int parent);
void AdjustUp(HeapDatatype* a, int child);

void HeapInit(HP* php);
void HeapDestroy(HP* php);
void HeapPush(HP* php, HeapDatatype x);
void HeapPop(HP* php);
HeapDatatype HeapTop(HP* php);
int HeapSize(HP* php);
bool HeapEmpty(HP* php);
